package com.cbb.display.config.quartz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import com.cbb.display.service.SysTaskService;

/** 

* @author 作者 lujunjie: 

* @version 创建时间：Jan 18, 2020 2:41:07 PM 

* 类说明 

*/
@Component
@Order(value = 1)
public class ScheduleJobInitListener implements CommandLineRunner {
 
  @Autowired
  SysTaskService scheduleJobService;
 
  @Autowired
  QuartzManager quartzManager;
 
  @Override
  public void run(String... arg0) throws Exception {
    try {
      scheduleJobService.initSchedule();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}
